﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.master" AutoEventWireup="true"
    CodeFile="Default.aspx.cs" Inherits="Menus_Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="phActions" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="phSubMenu" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="phMain" runat="Server">
    <ajax:Accordion ID="titleAccordian" SkinID="Title" runat="server">
        <Panes>
            <ajax:AccordionPane runat="server">
                <Header>
                    Menus</Header>
                <Content>
                    Menus are used to list posts. They are created by developers and used in templates
                    for site navigation and search engin submisions amongst other things.</Content>
            </ajax:AccordionPane>
        </Panes>
    </ajax:Accordion>
    <telerik:RadGrid ID="gridMenus" runat="server" AutoGenerateColumns="False" AllowAutomaticInserts="true" AllowAutomaticUpdates="true" AllowAutomaticDeletes="true" DataSourceID="dsMenus"
        GridLines="None">
        <mastertableview datasourceid="dsMenus" DataKeyNames="Id,SiteId,ConcurencyId" EditMode="EditForms" CommandItemDisplay="Bottom" InsertItemDisplay="Bottom">

<EditFormSettings>
<PopUpSettings ScrollBars="None"></PopUpSettings>
</EditFormSettings>
<RowIndicatorColumn Visible="False">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>

<ExpandCollapseColumn Visible="False" Resizable="False">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>

    <Columns>
        <acms:RadGridTextBoxColumn DataField="Name" HeaderText="Name" SortExpression="Name" UniqueName="Name" Required="true"/>
        <acms:RadGridTextBoxColumn DataField="ParentPath" HeaderText="Parent Path" SortExpression="ParentPath" UniqueName="ParentPath" Width="250px"/>
        <telerik:GridCheckBoxColumn DataField="IncludeParent" DataType="System.Boolean" 
            HeaderText="Include Parent" SortExpression="IncludeParent" 
            UniqueName="IncludeParent">
        </telerik:GridCheckBoxColumn>
        <telerik:GridCheckBoxColumn DataField="DefaultForAllPosts" 
            DataType="System.Boolean" HeaderText="Default For All Posts" 
            SortExpression="DefaultForAllPosts" UniqueName="DefaultForAllPosts">
        </telerik:GridCheckBoxColumn>
        <acms:RadGridTextAreaColumn DataField="Notes" HeaderText="Notes" Cols="50" Rows="5" />
        <telerik:GridHyperLinkColumn Text="View Posts" DataNavigateUrlFields="Id" DataNavigateUrlFormatString="Posts.aspx?Id={0}" />
        <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="Edit" />
        <telerik:GridButtonColumn ButtonType="ImageButton" UniqueName="Delete" CommandName="Delete" Text="Delete" ConfirmText="Sure you sure you want to delete this menu?" />
    </Columns>
    <EditFormSettings EditColumn-ButtonType="ImageButton">
<EditColumn ButtonType="ImageButton" UniqueName="EditCommandColumn1"></EditColumn>

<PopUpSettings ScrollBars="None"></PopUpSettings>
            </EditFormSettings>

</mastertableview>
    </telerik:RadGrid>
    <telerik:RadAjaxLoadingPanel ID="loading" SkinID="Loading" runat="server">
        <img src="../icons/loading1.gif" alt="loading" />
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadAjaxManager ID="ajaxManager" DefaultLoadingPanelID="loading" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="gridMenus">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="gridMenus" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <acms:MenuDataSource ID="dsMenus" runat="server" EnablePaging="False" 
        OnSelectData="dsMenus_SelectData" onupdatingdata="dsMenus_UpdatingData">
    </acms:MenuDataSource>
</asp:Content>
